package com.example.onlinemusic.tools;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;

import java.io.File;

/**
 * Created with IntelliJ IDEA.
 * Description:学习ResponseEntity的使用!
 * User: hold on
 * Date: 2022-07-30
 * Time: 13:35
 */
@RequestMapping("/musicTest")
public class ResponseEntityTest {
    //获取到音乐文件url路径前缀信息
    @Value("${music.url}")
    private String URL_PREV;

    @RequestMapping("/get")
    public ResponseEntity<byte[]> func(String path) {
        //byte[] a = {97,98,99,100};
       //return ResponseEntity.internalServerError().build();
        return ResponseEntity.notFound().build();
      //return ResponseEntity.ok(a);
    }
}
